<?PHP
  class MenuDeletePage extends Editor{
    function __construct($page){
      $this->page = $page;
    }
  
    public function display(){
      $template = new Template();
      if(!$_GET['delete']){
        $template->load("menu_delete");
        $template->assign_var("CANCELURL","javascript:history.back()");
        $template->assign_var("DELETEURL",Settings::getInstance()->get("host").$this->page->alias.".html?menu=".urlencode($_GET['menu'])."&delete=true");
      }
      else{
        $template->load("message");
        if(Menu::delete($GLOBALS['db']->EscapeString($_GET['menu']))){
            $template->assign_var("MESSAGE",$GLOBALS['language']->getString("MENU_DELETED"));
        }
        else{
          $template->assign_var("MESSAGE",$GLOBALS['language']->getString("MENU_NOT_DELETED"));
        }
      }
      $template->output();
    }

    function getHeader(){
    }
    
    public function getEditableCode(){
      return "<input name=\"save\" type=\"submit\" value=\"&Auml;ndern\" onclick=\"form.action='".$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."' ; target='_self' ; return true\" />";
    }
    
    public function save($newPage,$oldPage){
    }

    public function displayBreadcrumb($separator,$class,$idpraefix){
      FolderBreadcrumb::display($this->page,$separator,$class,$idpraefix);
    }  
}
?>